
/* First created by JCasGen Thu Nov 05 23:38:12 UYST 2009 */
package org.idtem.component.analisissintactico;

import org.apache.uima.jcas.JCas;
import org.apache.uima.jcas.JCasRegistry;
import org.apache.uima.cas.impl.CASImpl;
import org.apache.uima.cas.impl.FSGenerator;
import org.apache.uima.cas.FeatureStructure;
import org.apache.uima.cas.impl.TypeImpl;
import org.apache.uima.cas.Type;
import org.apache.uima.cas.impl.FeatureImpl;
import org.apache.uima.cas.Feature;

/** 
 * Updated by JCasGen Tue Nov 10 23:03:49 UYST 2009
 * @generated */
public class SyntacticLeafNode_Type extends BaseSyntacticFunction_Type {
  /** @generated */
  protected FSGenerator getFSGenerator() {return fsGenerator;}
  /** @generated */
  private final FSGenerator fsGenerator = 
    new FSGenerator() {
      public FeatureStructure createFS(int addr, CASImpl cas) {
  			 if (SyntacticLeafNode_Type.this.useExistingInstance) {
  			   // Return eq fs instance if already created
  		     FeatureStructure fs = SyntacticLeafNode_Type.this.jcas.getJfsFromCaddr(addr);
  		     if (null == fs) {
  		       fs = new SyntacticLeafNode(addr, SyntacticLeafNode_Type.this);
  			   SyntacticLeafNode_Type.this.jcas.putJfsFromCaddr(addr, fs);
  			   return fs;
  		     }
  		     return fs;
        } else return new SyntacticLeafNode(addr, SyntacticLeafNode_Type.this);
  	  }
    };
  /** @generated */
  public final static int typeIndexID = SyntacticLeafNode.typeIndexID;
  /** @generated 
     @modifiable */
  public final static boolean featOkTst = JCasRegistry.getFeatOkTst("org.idtem.component.analisissintactico.SyntacticLeafNode");
 
  /** @generated */
  final Feature casFeat_FreelingReference;
  /** @generated */
  final int     casFeatCode_FreelingReference;
  /** @generated */ 
  public int getFreelingReference(int addr) {
        if (featOkTst && casFeat_FreelingReference == null)
      jcas.throwFeatMissing("FreelingReference", "org.idtem.component.analisissintactico.SyntacticLeafNode");
    return ll_cas.ll_getRefValue(addr, casFeatCode_FreelingReference);
  }
  /** @generated */    
  public void setFreelingReference(int addr, int v) {
        if (featOkTst && casFeat_FreelingReference == null)
      jcas.throwFeatMissing("FreelingReference", "org.idtem.component.analisissintactico.SyntacticLeafNode");
    ll_cas.ll_setRefValue(addr, casFeatCode_FreelingReference, v);}
    
  



  /** initialize variables to correspond with Cas Type and Features
	* @generated */
  public SyntacticLeafNode_Type(JCas jcas, Type casType) {
    super(jcas, casType);
    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl)this.casType, getFSGenerator());

 
    casFeat_FreelingReference = jcas.getRequiredFeatureDE(casType, "FreelingReference", "org.idtem.component.freeling.Freeling2", featOkTst);
    casFeatCode_FreelingReference  = (null == casFeat_FreelingReference) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_FreelingReference).getCode();

  }
}



    